import java.util.*;
//坏掉的键盘
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String strExce = in.nextLine();
        String strActual = in.nextLine();
        funcPrint(strExce,strActual);
    }

    /**
     * 输出
     * @param strExce 7_This_is_a_test
     * @param strActual _hs_s_a_es
     */
    public static void funcPrint(String strExce,String strActual){
        Set<Character> set = new HashSet<>();
        //1、将坏键盘输出的数据放入set中
        //因题例中输出结果均为大写，调用toUpperCase()存入
        for (Character ch : strActual.toUpperCase().toCharArray()) {
            set.add(ch);
        }

        Set<Character> hasPrint = new HashSet<>();

        //2、遍历好键盘输入的数据，得出有问题的键
        for (Character ch : strExce.toUpperCase().toCharArray()) {
            //3、用hasPrint排除已经出现过的键
            if (!set.contains(ch) && !hasPrint.contains(ch)){
                System.out.print(ch);
                hasPrint.add(ch);
            }
        }
    }
}
 